package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.UserService;
import com.example.demo.vo.UserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wujj
 * @version 1.0
 * @Description:
 * @date 2019年04月09日 18:23
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;


    /**
     * 获取用户列表
     *
     * @param loginName
     * @param current
     * @param size
     * @return
     */
    @Override
    public IPage<UserVO> listUser(String loginName, String userName, String idCard, Integer current, Integer size) {
        Page<UserVO> pageInfo = new Page<>(current, size);
        IPage<UserVO> page = userMapper.selectPageVO(pageInfo, loginName, userName, idCard);
        return page;
    }



}
